<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>蔡徐坤</button>
    <button>吴亦凡</button>
    <img src="./蔡徐坤.webp" alt="" width="600px" height="400px">
</body>
</html>
<script>
    var but=document.querySelectorAll('button')
    var imt=document.querySelector('img')
    but[0].onclick=function(){
        imt.src='./蔡徐坤.webp'
        imt.title='真的是你啊！'
    }
    but[1].onclick=function(){
        imt.src='./吴亦凡.webp'
        imt.title='大碗牢饭'
    }
</script>